package com.douqu.game.auth.database.mapper;

import com.douqu.game.auth.database.model.CdkCodeModel;
import com.douqu.game.auth.database.model.CdkUseRecordModel;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: Bean
 * @Description:
 * @Date: 2017-11-13 15:08
 */
public interface CdkUseRecordMapper {

    int insert(CdkUseRecordModel model);
    /**
     * 传objectIndex     : 查找该用户有没有使用该cdk
     * 不传objectIndex   ：查找该cdk有没有被使用
     */
    Integer getPlayerUseCountByCdkId(@Param("cdkId") Integer cdkId,
                                 @Param("objectIndex") String objectIndex);

    Integer getPlayerUseCountInGroup(@Param("cp") String cp ,@Param("group") Integer group,
                                 @Param("objectIndex") String objectIndex);

}
